1. Field of the Invention
The present invention relates to a numerical control system using an I/O unit for time measurement.
2. Description of the Related Art
An in-machine measurement function of a numerically-controlled machine tool is implemented such that a touch sensor attached to the feed shaft of the machine tool is brought into contact with a measurement object by controlling the feed shaft and a signal from the touch sensor is used for measurement. According to this in-machine measurement function, the measurement object is measured in such a manner that a numerical controller notices the activation timing of the output of the touch sensor when the feed shaft is moved to bring the touch sensor into contact with the measurement object (Japanese Patent Application Laid-Open No. 5-66820). To achieve this function, the touch sensor output should be input as a DI signal to the numerical controller by some means or other.
Normally, signals of this type, as well as the signal for the touch sensor, are often input through a DI signal input interface on the numerical controller.
In order to input and output DI/DO signals (input and output signals) between the numerical controller (CNC) and the machine tool, a plurality of external signal input/output units (I/O units) are connected so that the DI/DO signals are normally transferred between the numerical controller and the I/O units. If the touch sensor output is input to the I/O units, it is possible to achieve a more flexible configuration and wiring than in the case where the DI signal is input through the interface on the numerical controller.
Since the numerical controller is expected to perform predetermined processing in a fixed time, however, the DI/DO signals are often transferred at regular intervals. If the touch sensor output is input to the numerical controller through the I/O units, in such a case, it is inevitably updated in each transfer period. Therefore, some means is needed to achieve higher-precision measurement. A technique to overcome this problem is disclosed in Japanese Patent Applications Laid-Open No. 6-149320 and No. 11-205392.
On the other hand, Japanese Patent Application Laid-Open No. 6-149320, mentioned above, discloses a technique in which I/O units perform event-driven communication with a numerical controller based on DI signal input as a trigger. According to this technique, the communication is effected interrupting periodic transfer. To achieve this, a sophisticated design, as well as a complicated arbiter circuit and priority setting, is required such that the transfer period is determined in consideration of interruption or is regularized through a special protocol or processing sequence using a timer circuit or the like, in place of fixed-period transfer.
Further, Japanese Patent Application Laid-Open No. 11-205392, mentioned above, discloses a technique in which I/O units individually comprise therein timers for time counting, which are synchronized by a communication protocol. According to this technique, the timers in the I/O units, which are strictly expected to be low in cost, are disadvantageous due to their increasing the circuit scale.